<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddFranchiseeColumnToBusinessAoiTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('business_aoi', function (Blueprint $table) {
            $table->string('preOccupyUsername', 64)->default('')->comment('预占址姓名');
            $table->string('preOccupyMobile', 24)->default('')->comment('预占址电话');
            $table->unsignedTinyInteger('occupyStatus')->default(0)->comment('占用状态 0-未占用 1-已占用');
            $table->unsignedInteger('capacity')->default(0)->comment('商圈容量');
            $table->unsignedInteger('population')->default(0)->comment('商圈人口');
            $table->unsignedInteger('worth')->default(0)->comment('商圈价值');
            $table->unsignedInteger('cityWorth')->default(0)->comment('城市价值');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('business_aoi', function (Blueprint $table) {
            $table->dropColumn('preOccupyUsername');
            $table->dropColumn('preOccupyMobile');
            $table->dropColumn('occupyStatus');
            $table->dropColumn('capacity');
            $table->dropColumn('population');
            $table->dropColumn('worth');
            $table->dropColumn('cityWorth');
            $table->dropColumn('createdByUid');
            $table->dropColumn('updatedByUid');
        });
    }
}
